-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU: More robust error reporting #10958
Conversation
if ( | ||
commandBufferHeader->render_pass.in_progress || | ||
commandBufferHeader->compute_pass.in_progress || | ||
commandBufferHeader->copy_pass.in_progress) { | ||
SDL_assert_release(!"Cannot submit command buffer while a pass is in progress!"); | ||
return; | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should set an error (and maybe log in debug mode instead of asserting?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An assert is infinitely more useful here for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our intention was to assert in gpu.c in debug mode because the errors we catch there are client misuses.
*David Lynch voice* Imagine fixing CI from your... fucking telephone
Currently making sure that we're logging errors in debug mode and then this is good to go. |
Looks like Haiku CI went down... this should be clear to squash once it's back up and green. |
Resolves #10779
I rewrote a lot of error checking so that functions that can fail will bubble up the error to the caller. There is no longer a distinction between logging or setting an error because failures will always set an error. In debug mode the error function will also log.
Commands do not return errors. Since their execution is deferred, the expectation is that the graphics API's validator layer will catch those.
Most graphics errors are not sanely recoverable, but the client can now at least check for errors and report them before crashing.
Needs a Metal implementation before merge.